<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>积分平台</title>
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no">
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=0">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
		<link rel="stylesheet" type="text/css" href="__INDEX__/mui/css/mui.min.css"/>
		<link rel="stylesheet" type="text/css" href="__INDEX__/mui/css/mui.picker.min.css"/>
		<link rel="stylesheet" type="text/css" href="__INDEX__/css/iconfont.css"/>
		<link rel="stylesheet" type="text/css" href="__INDEX__/css/common.css"/>
		<link rel="stylesheet" type="text/css" href="__INDEX__/css/setUp.css"/>
		<script src="__INDEX__/js/lib/font.js" type="text/javascript" charset="utf-8"></script>
	</head>
	<body>
	    <header class="mui-bar mui-bar-nav">
	        <a class="mui-icon mui-icon-left-nav mui-pull-left goindex" style="color: #ffffff;"></a>
	        <h1 class="mui-title">打卡设置</h1>
	        <a href="javascript:;" class="mui-pull-right nav-right-btn" id="queding">确定</a>
	    </header>
	    <div class="mui-content">
	        <p class="title">考勤信息修改后，立即生效,并设置本WiFi为打卡WiFi</p>
	        <div class="modular">
	        	<div class="toWorkTime">
	        		<a href="javascript:;" id="choiceToWorkTime">
		        		<span class="mui-pull-left">上班时间</span>
		        		<span class="mui-pull-right toWorkTime-cont">{if $seting}{$seting['work_shift']}{else}9:00{/if}<i class="mui-pull-right mui-icon mui-icon-arrowright"></i></span>
			        </a>
		        </div>
	        </div>
	        <div class="modular">
	        	<div class="offWorkTime">
	        		<a href="javascript:;" id="choiceOffWorkTime">
		        		<span class="mui-pull-left">下班时间</span>
		        		<span class="mui-pull-right offWorkTime-cont">{if $seting}{$seting['closing_time']}{else}18:00{/if}<i class="mui-pull-right mui-icon mui-icon-arrowright"></i></span>
			        </a>
		        </div>
	        </div>
	        <div class="modular">
				<div class="attendanceDate">
					<a href="javascript:;" id="choiceAttenTime">
						<span class="mui-pull-left" >考勤日期</span>
						<span class="mui-pull-right attendanceDate-cont">
								星期&nbsp;{if $seting}{foreach $seting['attendance'] as $value}{$value}、{/foreach}{else}一、二、三、四、五、{/if}
								<i class="mui-pull-right mui-icon mui-icon-arrowright"></i>
							</span>
					</a>
				</div>
			</div>
			<div class="modular">
				<div class="attendanceDate">
					<a href="javascript:;" id="late_time">
						<span class="mui-pull-left" >迟到与旷工分界</span>
						<span class="mui-pull-right">
							{if $seting}{$seting['late_time']}{else}30{/if}分
								<i class="mui-pull-right mui-icon mui-icon-arrowright"></i>
							</span>
					</a>
				</div>
			</div>
			<div class="modular">
				<div class="attendanceDate">
					<a href="javascript:;" id="overtime">
						<span class="mui-pull-left" >超时多久为加班</span>
						<span class="mui-pull-right">
							{if $seting}{$seting['overtime']}{else}30{/if}分
								<i class="mui-pull-right mui-icon mui-icon-arrowright"></i>
							</span>
					</a>
				</div>
			</div>
			<form id="forms" enctype="multipart/form-data">
				<input type="hidden"  name="work_shift" value="{if $seting}{$seting['work_shift']}{else}9:00{/if}">
				<input type="hidden" name="closing_time" value="{if $seting}{$seting['closing_time']}{else}18:00{/if}">
				<input type="hidden" name="attendance" value="{if $seting}{$seting['attendances']}{else}1,2,3,4,5{/if}">
				<input type="hidden" name="late_time" value="{if $seting}{$seting['late_time']}{else}30{/if}">
				<input type="hidden" name="overtime" value="{if $seting}{$seting['overtime']}{else}30{/if}">
			</form>
	        <!--<div class="modular">-->
				<!--<div class="mui-input-row">-->
			        <!--<label>WiFi名称：</label>-->
			    	<!--<input type="text" class="mui-input-clear" placeholder="请设置WiFi名称" data-input-clear="1"><span class="mui-icon mui-icon-clear mui-hidden"></span>-->
			    	<!--&lt;!&ndash;<span class="mui-icon mui-icon-arrowright"></span>&ndash;&gt;-->
				<!--</div>-->
			<!--</div>-->
	    </div>
	    <nav class="mui-bar mui-bar-tab footer">
	        <a class="mui-tab-item mui-active">
	            <span class="mui-icon mui-icon-home"></span>
	            <span class="mui-tab-label">首页</span>
	        </a>
	        <a class="mui-tab-item">
	            <i class="mui-icon iconfont">&#xe7bd;</i>
	            <span class="mui-tab-label">积分榜</span>
	        </a>
	        <a class="mui-tab-item">
	            <i class="mui-icon iconfont">&#xe64e;</i>
	            <span class="mui-tab-label">平台使用</span>
	        </a>
	        <a class="mui-tab-item">
				<i class="mui-icon iconfont">&#xe649;</i>
				<span class="mui-tab-label">个人中心</span>
				{if $newsshu}
				<b class="mui-badge mui-badge-danger weidu" style="position: absolute;top:.03rem;right:.2rem">
					{$newsshu}
				</b>
				{else}
				<b class="mui-badge mui-badge-danger weidu" style="position: absolute;top:.03rem;right:.2rem;display: none">
				</b>
				{/if}
			</a>
	    </nav>
		<script src="__INDEX__/js/lib/zepto.js" type="text/javascript" charset="utf-8"></script>
		<script src="__INDEX__/mui/js/mui.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="__INDEX__/layer_mobile/layer.js" type="text/javascript" charset="utf-8"></script>
		<script src="__INDEX__/mui/js/mui.picker.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="__INDEX__/js/common.js" type="text/javascript" charset="utf-8"></script>
		<script src="__INDEX__/js/setUp.js" type="text/javascript" charset="utf-8"></script>
		<script src="__INDEX__/js/jquery.3.3.1.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="__INDEX__/js/maowenke.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			setInterval(function(){
                var $num = parseInt(Math.random()*9)+1;
                $.post("/index/Message/index"+$num,{},function(data){
                    if(data.code==200){
                        if(data.data!=0){
                            $(".weidu").css("display",'block');
                            $(".weidu").text(data.data);
						}else{
                            $(".weidu").css("display",'none');
						}
					}
				});
			},60000);
            $(".goindex").on('tap',function () {
                window.location.href = "{:url('index/index')}";
            });
			function judgePlatform(){  
			    switch ( plus.os.name ) {  
			        case "Android":  
			        // Android平台: plus.android.*  
			        break;  
			        case "iOS":  
			        // iOS平台: plus.ios.*  
			        break;  
			        default:  
			        // 其它平台  
			        break;  
			    }
			}
            $("#queding").on('tap',function () {
//                var time = $("[name=attendance]").val();
//                console.log(time);
                ajax($("#forms"),"{:url('update/setting')}",function (data) {
                    console.log(data);
					mui.alert(data.msg);
                })
            })
		</script>
	</body>
</html>
